class ApplicationController < ActionController::Base
  #protect_from_forgery
  before_filter :authorize

  def authorize
    unless signined?
      flash[:error] = '请先登录'
      redirect_to signin_path
    end
  end

  def signined?
    session[:user_id]
  end
end
